home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / dsp / dr.bub / 96000.lha / 96000 / appb / b134.asm < prev    next >
Assembly Source File  |  1992-04-28  |  2KB  |  64 lines

  1. ; This program was originally published in the Motorola DSP96002 Users Manual
  2. ; and is provided under a DISCLAIMER OF WARRANTY available from Motorola DSP
  3. ; Operation, 6501 William Cannon Drive West, Austin, Texas 78735-8598.  For
  4. ; more information, refer to the DSP96002 Users Manual, Appendix B, DSP
  5. ; Benchmarks.
  6. ;
  7. ; B.1.34    Cascaded Five Coefficient Transpose IIR Filter  
  8. ;The cascaded transpose IIR filter has a filter section:  
  9. ;The filter equations are: 
  10. ;    y  = x*bi0 + w1 
  11. ;    w1 = x*bi1 + y*ai1 + w2 
  12. ;    w2 = x*bi2 + y*a2 
  13. ;                    Program    ICycles 
  14. ;                                                            Words 
  15. nsec equ   3 
  16.  
  17.     org    x:0 
  18. coef 
  19.     dc    .93622314E-04     ;/* section  1 B0 */ 
  20.     dc    .18724463E-03     ;/* section  1 B1 */ 
  21.     dc    .19625904E+01     ;/* section  1 A1 */ 
  22.     dc    .93622314E-04     ;/* section  1 B2 */ 
  23.     dc    -.96296486E+00    ;/* section  1 A2 */ 
  24.  
  25.     dc    .94089162E-04     ;/* section  2 B0 */ 
  26.     dc    .18817832E-03     ;/* section  2 B1 */ 
  27.     dc    .19723768E+01     ;/* section  2 A1 */ 
  28.     dc    .94089162E-04     ;/* section  2 B2 */ 
  29.     dc    -.97275320E+00    ;/* section  2 A2 */ 
  30.  
  31.     dc    .94908880E-04     ;/* section  3 B0 */ 
  32.     dc    .18981776E-03     ;/* section  3 B1 */ 
  33.     dc    .19895605E+01     ;/* section  3 A1 */ 
  34.     dc    .94908880E-04     ;/* section  3 B2 */ 
  35.     dc    -.98994009E+00    ;/* section  3 A2 */ 
  36.  
  37.     org    y:0 
  38. w1    dsm    nsec 
  39. w2    dsm    nsec 
  40.  
  41.     org    p:$100 
  42.     move   #coef,r0 
  43.     move   #5*nsec-1,m0 
  44.     move   #w1,r4 
  45.     move   #nsec-1,m4 
  46.     move   #w2,r5 
  47.     move   m4,m5 
  48. ;    input in d7 
  49.     move   x:(r0)+,d4.s            ;get b0                    1      1 
  50.     do     #nsec,tran                                        ; 2      3 
  51.     fmpy   d7,d4,d0  fadd.s d1,d2 x:(r0)+,d4.s  y:(r4),d5.s  ; 1      1 
  52.     fmpy   d7,d4,d1  fadd.s d5,d0 x:(r0)+,d4.s  y:(r5),d6.s ;  1      1 
  53.     fmpy   d0,d4,d2  fadd.s d6,d1 x:(r0)+,d4.s  d2.s,y:(r5)+ ; 1      1 
  54.     fmpy   d7,d4,d2  fadd.s d2,d1 x:(r0)+,d4.s  d0.s,d7.s    ; 1      1 
  55.     fmpy.s d0,d4,d1               x:(r0)+,d4.s  d1.s,y:(r4)+ ; 1      1 
  56. tran 
  57.                      fadd.s d1,d2                            ; 1      1 
  58.     move   d2.s,y:(r5)+                                      ; 1      1 
  59.     move   d0.s,y:$ffff 
  60.                                                             ; ---    --- 
  61.                                                  ;   Totals:  10    5N+6 
  62.